﻿using LD.Host;
using LD.Tool;
using PubSub;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LD.Tool
{
    [Tool(Text = "WIP开始时间", FrmParam = "", ToolType = ToolEnum.Other)]
    public class ToolWipStartTime : BaseTool
    {
        public override OpResult Execute(TB_Tool model)
        {
            try
            {
                stopwatch.Start();
                Appbus.Wip.StartTime = DateTime.Now;
                isSuccess = true;
            }
            catch (Exception ex)
            {
                Log(model, ex.Message, LogLevel.严重);
            }
            finally
            {
                stopwatch.Stop();
            }
            return new OpResult() { IsSuccess = isSuccess, Message = message, ExecuteTime = stopwatch.ElapsedMilliseconds };
        }
    }
}
